<template>
  <div class="bg">
    <h2 class="title">学生</h2>
    <h3>{{ studentName | sliceTime }}</h3>
    <h3>{{ age }}</h3>
    <button @click="$myMethod">$myMethod</button>
  </div>
</template>

<script>
export default {
  name: 'my-student',
  data() {
    return {
      studentName: 'lqj123456',
      age: 18
    }
  }
}
</script>

<!-- 实际开发中，多人协作开发时，为了避免子组件样式名重复，通过scoped来限制样式只在该组件实例内生效 -->
<style scoped>
  .bg {
    background-color: orange;
  }
</style>